package org.example.coffeeshoporderingsystem.index.controller;

import javafx.event.ActionEvent;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import org.example.coffeeshoporderingsystem.common.controller.BaseController;
import org.example.coffeeshoporderingsystem.common.ui.UIManager;
import org.example.coffeeshoporderingsystem.login.controller.LoginController;
import org.example.coffeeshoporderingsystem.staff.util.StaffUtil;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;

public class IndexController extends BaseController {


    public Label staffInfoLabel;

    public void showOrder() throws IOException {
        UIManager.switchToOrderList();
    }

    public void showMember() throws IOException {
        UIManager.switchToMemberList();
    }

    public void showReport() throws IOException {
        UIManager.switchToReport();
    }
    public void showStore() throws IOException {
        UIManager.switchToStore();
    }

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        var staff = StaffUtil.getStaff();
        staffInfoLabel.setText(staff.getName()+"("+staff.getRole()+")");
    }
}
